<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DIDIFight</title>
<#include "common/header.ftl"/>
<script type="text/javascript" src="/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="/js/plugins/jquery.twbsPagination.min.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js" ></script>

<script type="text/javascript">
	$(function(){
	    $("#query").click(function(){
	        $("#currentPage").val(1);
	        $("#searchForm").submit()
		});

	    $(".beginDate,.endDate").click(function(){
            WdatePicker();
		});


        $("#pagination").twbsPagination({
            totalPages: ${pageResult.pages} || 1,
			visiblePages:5,
            startPage:${pageResult.pageNum},
        	onPageClick:function(event,page){
			    $("#currentPage").val(page);
            	$("#searchForm").submit();
        	}
    	})
	})
</script>
</head>
<body>
	<div class="container" style="width: 1600px">
		<#include "common/top.ftl"/>
		<div class="row">
			<div class="col-sm-3">
			<#assign currentMenu = "client" />
        	<#include "common/menu.ftl" />
            </div>
			<div class="col-sm-9" style="width: 1200px">
				<div class="page-header">
					<h3>关注用户管理</h3>
				</div>
				<form id="searchForm" class="form-inline" method="post" action="/client">
					<input type="hidden" id="currentPage" name="currentPage" value=""/>
					<div class="form-group">
					    <label>状态</label>
					     <select class="form-control" name="subscribe" id="subscribe">
					    	<option value="-1">全部</option>
					    	<option value="1">已关注</option>
					    	<option value="0">未关注</option>
					    </select>
					</div>

					<#--下拉框的回显-->
                    <script type="text/javascript">
                        $("#subscribe option[value=${qo.subscribe}]").prop('selected','true');
                    </script>

                    <div class="form-group">
					    <label>登陆时间</label>
					    <input class="form-control beginDate" type="text" name="beginDate" value="${(qo.beginDate?string('yyyy-MM-dd'))!''}"/>到
					    <input class="form-control endDate" type="text" name="endDate" value="${(qo.endDate?string('yyyy-MM-dd'))!''}"/>
					</div>

					<div class="form-group">
						<label>用户名</label>
						<input class="form-control" type="text" name="keyword" value="${qo.keyword!""}"/>
					</div>
					<div class="form-group">
						<button id="query" type="button" class="btn btn-success"><i class="icon-search"></i> 查询</button>
					</div>
				</form>
				<div class="panel panel-default" style="width: 1200px">
					<table class="table">
						<thead>
							<tr>
								<th>用户昵称</th>
								<th>性别</th>
								<th>语言</th>
								<th>国家</th>
								<th>省份</th>
								<th>城市</th>
								<th>最后关注时间</th>
								<th>openid</th>
								<th>用户关注状态</th>
							</tr>
						</thead>
						<tbody id="tbody">
							<#list pageResult.list as item>
							<tr>
								<td>${item.nickname}</td>
						        <td>${item.sexDisplay}</td>
						        <td>${item.language}</td>
						        <td>${item.country}</td>
						        <td>${item.province}</td>
						        <td>${item.city}</td>
								<td>${item.dateTime?string('yyyy-MM-dd HH:mm:ss')}</td>
						        <td>${item.openid}</td>
						        <td>${item.stateDisplay}</td>
							</tr>
							</#list>
						</tbody>
					</table>
                    <div style="text-align: center;">
                        <ul id="pagination" class="pagination"></ul>
                    </div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>